package com.starblink.library.widget.search.cell

import com.starblink.android.basic.adapter.BaseBindingVH
import com.starblink.library.widget.databinding.CellSearchComposedWordBinding

internal class SearchComposedWordCell(
    binding: CellSearchComposedWordBinding,
    private val onItemClick: ((position: Int) -> Unit)? = null
) :
    BaseBindingVH<String, CellSearchComposedWordBinding>(binding) {
    override fun onBind(model: String, position: Int) {
        binding.btn.text = model
        binding.btn.setOnClickListener {
            onItemClick?.invoke(position)
        }
    }
}